

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Console Tab [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Scripter Window,Scripter Window Console Tab,Scripter Window Console Toolbar,Script,Script Console,Script Commands,Console,Console Tab, Scripter Window,Console Commands, Scripter Window,Toolbar,Toolbar Console Tab, Scripter Window">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Console Tab</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="scripts_tab.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="script_editors.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">The script console is a tab of the </span><span class="f_UIControl">Scripter</span><span class="f_BodyText"> window. It is a command line interpreter with which you can quickly enable a script engine and enter commands to act on the script.</span></p>
<p class="p_TextIndentedL2"><img src="scripterconsole.png" width="217" height="301" border="0" alt="ScripterConsole"></p>
<p class="p_BodyText"><span class="f_BodyText">You type the commands in the field at the bottom of the tab; when you press the </span><span class="f_MenuKeyField">[Enter]</span><span class="f_BodyText"> key, the script console executes the commands and displays any output immediately. </span></p>
<p class="p_BodyText"><span class="f_BodyText">You can input two types of commands:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">Console commands</span></li>
<li><span class="f_Bulletlist1">Script commands.</span></li>
</ul>
<p class="p_SubHeadingL2"><span class="f_SubHeadingL2">Console Commands </span></p>
<p class="p_BodyText"><span class="f_BodyText">Console commands are preceded by the</span><span class="f_BodyText" style="font-weight: bold;"> ! </span><span class="f_BodyText">character and instruct the console to perform an action. The available console commands are listed below; to list these commands on the </span><span class="f_UIControl">Console</span><span class="f_BodyText"> tab itself (as shown above) type</span><span class="f_Code" style="font-weight: bold;">?</span><span class="f_BodyText"> in the console field (without the preceding ! character) .</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_MenuKeyField">c(lear)</span><span class="f_Bulletlist1"> - clears the console display</span></li>
<li><span class="f_MenuKeyField">sa(ve)</span><span class="f_Bulletlist1"> - saves the console display to a file</span></li>
<li><span class="f_MenuKeyField">h(elp)</span><span class="f_Bulletlist1"> - prints a list of commands, as for ?</span></li>
<li><span class="f_MenuKeyField">VB</span><span class="f_Bulletlist1"> - opens a VBScript console</span></li>
<li><span class="f_MenuKeyField">JA</span><span class="f_Bulletlist1"> - opens a JavaScript console</span></li>
<li><span class="f_MenuKeyField">JS</span><span class="f_Bulletlist1"> - opens a JScript console</span></li>
<li><span class="f_MenuKeyField">st(op)</span><span class="f_Bulletlist1"> - closes any script running console</span></li>
<li><span class="f_MenuKeyField">i(nclude) </span><span class="f_MenuKeyField" style="font-style: italic;">name</span><span class="f_Bulletlist1"> - executes the named script item; </span><span class="f_Bulletlist1" style="font-style: italic;">name</span><span class="f_Bulletlist1"> is of the format </span><span class="f_Bulletlist1" style="font-style: italic;">GroupName.ScriptName</span><span class="f_Bulletlist1"> (spaces are allowed in names)</span></li>
<li><span class="f_MenuKeyField">?</span><span class="f_Bulletlist1"> - (without the !) lists commands</span></li>
<li><span class="f_MenuKeyField">?</span><span class="f_MenuKeyField" style="font-style: italic;">name</span><span class="f_Bulletlist1"> - Outputs the value of a variable </span><span class="f_Bulletlist1" style="font-style: italic;">name</span><span class="f_Bulletlist1"> (only if a script console is opened).</span></li>
</ul>
<p class="p_SubHeadingL2"><span class="f_SubHeadingL2">Script Commands </span></p>
<p class="p_BodyText"><span class="f_BodyText">A script command is script code that depends on the script engine. Script commands can be executed only once a script console has been created.</span></p>
<p class="p_BodyText"><span class="f_BodyText" style="font-style: italic;">Examples: </span></p>
<p class="p_BodyText"><span class="f_BodyText">The following lines, entered into the console, create a </span><span class="f_BodyText" style="font-style: italic;">VBScript</span><span class="f_BodyText"> console and then execute the script </span><span class="f_BodyText" style="font-style: italic;">MyScript</span><span class="f_BodyText"> in the user group </span><span class="f_BodyText" style="font-style: italic;">MyGroup.</span></p>
<p class="p_Code"><span class="f_Code">&gt;!VB </span></p>
<p class="p_Code"><span class="f_Code">&gt;!i MyGroup.MyScript </span></p>
<p class="p_BodyText"><span class="f_BodyText">The following lines, entered into the console, create a </span><span class="f_BodyText" style="font-style: italic;">JScript</span><span class="f_BodyText"> console and then create a variable called </span><span class="f_BodyText" style="font-weight: bold;">x</span><span class="f_BodyText"> with the value </span><span class="f_BodyText" style="font-weight: bold;">1</span><span class="f_BodyText">.</span></p>
<p class="p_Code"><span class="f_Code">&gt;!JS </span></p>
<p class="p_Code"><span class="f_Code">&gt;var x = 1</span></p>
<p class="p_BodyText"><span class="f_BodyText">The following diagram shows the result of entering the above JScript example. Remember that you can use </span><span class="f_BodyText" style="font-weight: bold;">?&lt;variable name&gt;</span><span class="f_BodyText"> to get the current value of any item you've created during the console session. </span></p>
<p class="p_BodyText"><img src="scripterconsvar.png" width="205" height="227" border="0" alt="ScripterConsVar"></p>
<p class="p_SubHeadingL2"><span class="f_SubHeadingL2">Console Tab Toolbar</span></p>
<p class="p_BodyText"><span class="f_BodyText">The </span><span class="f_UIControl">Console</span><span class="f_BodyText"> tab has two operations available through the toolbar:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">Open Console (</span><img src="runscript.png" width="21" height="26" border="0" alt="Runscript"><span class="f_Bulletlist1">) - click on the down-arrow and select to open a VBScript console, JScript console or JavaScript console</span></li>
<li><span class="f_Bulletlist1">Stop Script ( </span><img src="stopscript.png" width="26" height="24" border="0" alt="Stopscript"><span class="f_Bulletlist1">) - click to stop an executing script and close the current console.</span></li>
</ul>




            </div>
          </div>
        </div>



</div>


</body>
</html>
